import React from "react";
import RecipeDetailScreen from "./Screens/Restaurant/RecipeDetailScreen";
import WelcomeScreen from "./Screens/Restaurant/WelcomeScreen";
import HomeScreen from "./Screens/Restaurant/HomeScreen";
import { Provider } from "react-redux";

import { createNativeStackNavigator } from '@react-navigation/native-stack';
import CartScreen from "./Screens/Restaurant/CartScreen";
import { NavigationContainer } from "@react-navigation/native";
import { TailwindProvider } from 'tailwindcss-react-native';
import {store} from './redux/store';
const Stack  = createNativeStackNavigator();

const App = () => {
{/* <RecipeDetailScreen recipe={DATA[0].recipes[1]} />; */}
  return (
    <Provider store={store}>
    <NavigationContainer>
      <TailwindProvider>
      <Stack.Navigator>
        <Stack.Screen name="start" component={WelcomeScreen} />
        <Stack.Group screenOptions={{headerBackVisible:false,headerShown:false}}>
        <Stack.Screen name="Home" component={HomeScreen} />
        <Stack.Screen name="RecipeDetail" component={RecipeDetailScreen}  />
        </Stack.Group>
        <Stack.Screen name="cart" component={CartScreen} options={{title:'下单',headerBackTitle:'返回'}} />
      </Stack.Navigator>
      </TailwindProvider>
    </NavigationContainer>
    </Provider>
    )
};

export default App;
